<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap" >
    <div class="h_a">搜索</div>
    <form
            action="${requestScope.FPWEB.rootPath }/credit/list${requestScope.FPWEB.urlStuff}"
            method="get" autocomplete="off">
        <div class="search_type cc">
            <label>手机号：</label>
            <input name="mobile_number" type="text" class="input length_3 mr10" value="${param.mobile_number}" placeholder="手机">
            <label>申请日期：</label>
            <input name="applydate1" type="text" class="input length_1 mr10 J_date" value="${param.applydate1}">
            <input name="applydate2" type="text" class="input length_1 mr10 J_date" value="${param.applydate2}">
            <button type="submit" class="btn btn_submit length_1">搜索</button>
        </div>
    </form>
    <div class="table_list">
        <c:set var="hashData"
               value="${models!=null && fn:length(models)>1 }" />
        <table width="100%">
            <thead>
            <tr>
                <td>用户ID</td>
                <td>用户姓名</td>
                <td>当前额度</td>
                <td>剩余额度</td>
                <td>申请额度</td>
                <td>联系电话</td>
                <td>申请时间</td>
                <td>注册时间</td>
                <td>状态</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody id="J_word_list">
            <c:forEach items="${pager.pagerModel.dataList }" var="item" varStatus="i">
                <tr>
                    <td>${item.user_id}</td>
                    <td>${item.strMap.id_name}</td>
                    <td><f:formatNumber value="${item.strMap.credit_line}" pattern=",##0.00"/></td>
                    <td><f:formatNumber value="${item.strMap.residual_amount}" pattern=",##0.00"/></td>
                    <td><f:formatNumber value="${item.apply_credit_line}" pattern=",##0.00"/></td>
                    <td>${item.mobile_number}</td>
                    <td><yjd:jstl_date value="${item.apply_time}" parttern="yyyy-MM-dd HH:mm:ss"/></td>
                    <td><yjd:jstl_date value="${item.registration_time}" parttern="yyyy-MM-dd HH:mm:ss"/></td>
                    <td><c:choose>
                        <c:when test="${item.status == 0}">待处理</c:when>
                        <c:when test="${item.status == 1}">通过</c:when>
                        <c:when test="${item.status == 2}">拒绝</c:when>
                    </c:choose></td>
                    <td>
                        <c:if test="${item.status == 0}">
                            <a href='<yjd:url url="/credit/info/${item.id }"/>' class="btn mr10 btn_green">审核</a>
                        </c:if>
                        <c:if test="${item.status != 0}">
                            <a href='<yjd:url url="/credit/info/${item.id }"/>' class="btn mr10">查看</a>
                        </c:if>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <%@ include file="../public/pager/pager.pagination.jsp" %>
</div>
